<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>NEWS-3.1.0 - RDoc Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="file">
  <!-- this is page.html -->
  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0-preview2 NOT FOUND -->
  </div> <!-- end action bar -->


 <div class='wrapper hdiv'>

 


<nav id='vapp' role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  
<div class="nav-section">
  <h3>Table of Contents</h3>

  <ul class="link-list" role="directory">
    <li><a href="#label-NEWS+for+Ruby+3.1.0">NEWS for Ruby 3.1.0</a>
    <li><a href="#label-Language+changes">Language changes</a>
    <li><a href="#label-Command+line+options">Command line options</a>
    <li><a href="#label-Core+classes+updates">Core classes updates</a>
    <li><a href="#label-Stdlib+updates">Stdlib updates</a>
    <li><a href="#label-Compatibility+issues">Compatibility issues</a>
    <li><a href="#label-Stdlib+compatibility+issues">Stdlib compatibility issues</a>
    <li><a href="#label-C+API+updates">C API updates</a>
    <li><a href="#label-Implementation+improvements">Implementation improvements</a>
    <li><a href="#label-JIT">JIT</a>
    <li><a href="#label-MJIT">MJIT</a>
    <li><a href="#label-YJIT-3A+New+experimental+in-process+JIT+compiler">YJIT: New experimental in-process JIT compiler</a>
    <li><a href="#label-Static+analysis">Static analysis</a>
    <li><a href="#label-RBS">RBS</a>
    <li><a href="#label-TypeProf">TypeProf</a>
    <li><a href="#label-Debugger">Debugger</a>
    <li><a href="#label-error_highlight">error_highlight</a>
    <li><a href="#label-IRB+Autocomplete+and+Document+Display">IRB Autocomplete and Document Display</a>
    <li><a href="#label-Miscellaneous+changes">Miscellaneous changes</a>
  </ul>
</div>

  <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>

  <div id="project-metadata">
   <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
    
<div id="fileindex-section" class="nav-section">
  <h3>Pages</h3>

  <ul class="link-list">
    <li><a href="../NEWS/NEWS-1_8_7.html">NEWS-1.8.7</a>
    <li><a href="../NEWS/NEWS-1_9_1.html">NEWS-1.9.1</a>
    <li><a href="../NEWS/NEWS-1_9_2.html">NEWS-1.9.2</a>
    <li><a href="../NEWS/NEWS-1_9_3.html">NEWS-1.9.3</a>
    <li><a href="../NEWS/NEWS-2_0_0.html">NEWS-2.0.0</a>
    <li><a href="../NEWS/NEWS-2_1_0.html">NEWS-2.1.0</a>
    <li><a href="../NEWS/NEWS-2_2_0.html">NEWS-2.2.0</a>
    <li><a href="../NEWS/NEWS-2_3_0.html">NEWS-2.3.0</a>
    <li><a href="../NEWS/NEWS-2_4_0.html">NEWS-2.4.0</a>
    <li><a href="../NEWS/NEWS-2_5_0.html">NEWS-2.5.0</a>
    <li><a href="../NEWS/NEWS-2_6_0.html">NEWS-2.6.0</a>
    <li><a href="../NEWS/NEWS-2_7_0.html">NEWS-2.7.0</a>
    <li><a href="../NEWS/NEWS-3_0_0_md.html">NEWS-3.0.0</a>
    <li><a href="../NEWS/NEWS-3_1_0_md.html">NEWS-3.1.0</a>
    <li><a href="../NEWS/NEWS-3_2_0_md.html">NEWS-3.2.0</a>
    <li><a href="../bsearch_rdoc.html">bsearch</a>
    <li><a href="../bug_triaging_rdoc.html">bug_triaging</a>
    <li><a href="../case_mapping_rdoc.html">case_mapping</a>
    <li><a href="../character_selectors_rdoc.html">character_selectors</a>
    <li><a href="../command_injection_rdoc.html">command_injection</a>
    <li><a href="../contributing_md.html">contributing</a>
    <li><a href="../contributing/building_ruby_md.html">building_ruby</a>
    <li><a href="../contributing/documentation_guide_md.html">documentation_guide</a>
    <li><a href="../contributing/glossary_md.html">glossary</a>
    <li><a href="../contributing/making_changes_to_ruby_md.html">making_changes_to_ruby</a>
    <li><a href="../contributing/making_changes_to_stdlibs_md.html">making_changes_to_stdlibs</a>
    <li><a href="../contributing/reporting_issues_md.html">reporting_issues</a>
    <li><a href="../contributing/testing_ruby_md.html">testing_ruby</a>
    <li><a href="../dig_methods_rdoc.html">dig_methods</a>
    <li><a href="../distribution_md.html">distribution</a>
    <li><a href="../dtrace_probes_rdoc.html">dtrace_probes</a>
    <li><a href="../encodings_rdoc.html">encodings</a>
    <li><a href="../extension_ja_rdoc.html">extension.ja</a>
    <li><a href="../extension_rdoc.html">extension</a>
    <li><a href="../fiber_md.html">fiber</a>
    <li><a href="../format_specifications_rdoc.html">format_specifications</a>
    <li><a href="../globals_rdoc.html">globals</a>
    <li><a href="../implicit_conversion_rdoc.html">implicit_conversion</a>
    <li><a href="../keywords_rdoc.html">keywords</a>
    <li><a href="../maintainers_md.html">maintainers</a>
    <li><a href="../marshal_rdoc.html">marshal</a>
    <li><a href="../memory_view_md.html">memory_view</a>
    <li><a href="../optparse/argument_converters_rdoc.html">argument_converters</a>
    <li><a href="../optparse/creates_option_rdoc.html">creates_option</a>
    <li><a href="../optparse/option_params_rdoc.html">option_params</a>
    <li><a href="../optparse/tutorial_rdoc.html">tutorial</a>
    <li><a href="../packed_data_rdoc.html">packed_data</a>
    <li><a href="../ractor_md.html">ractor</a>
    <li><a href="../regexp_rdoc.html">regexp</a>
    <li><a href="../regexp/methods_rdoc.html">methods</a>
    <li><a href="../regexp/unicode_properties_rdoc.html">unicode_properties</a>
    <li><a href="../ruby_3_3_0_preview2/COPYING.html">COPYING</a>
    <li><a href="../ruby_3_3_0_preview2/COPYING_ja.html">COPYING.ja</a>
    <li><a href="../ruby_3_3_0_preview2/LEGAL.html">LEGAL</a>
    <li><a href="../ruby_3_3_0_preview2/NEWS_md.html">NEWS</a>
    <li><a href="../ruby_3_3_0_preview2/README_ja_md.html">README.ja</a>
    <li><a href="../ruby_3_3_0_preview2/README_md.html">README</a>
    <li><a href="../security_rdoc.html">security</a>
    <li><a href="../signals_rdoc.html">signals</a>
    <li><a href="../standard_library_rdoc.html">standard_library</a>
    <li><a href="../strftime_formatting_rdoc.html">strftime_formatting</a>
    <li><a href="../syntax_rdoc.html">syntax</a>
    <li><a href="../syntax/assignment_rdoc.html">assignment</a>
    <li><a href="../syntax/calling_methods_rdoc.html">calling_methods</a>
    <li><a href="../syntax/comments_rdoc.html">comments</a>
    <li><a href="../syntax/control_expressions_rdoc.html">control_expressions</a>
    <li><a href="../syntax/exceptions_rdoc.html">exceptions</a>
    <li><a href="../syntax/literals_rdoc.html">literals</a>
    <li><a href="../syntax/methods_rdoc.html">methods</a>
    <li><a href="../syntax/miscellaneous_rdoc.html">miscellaneous</a>
    <li><a href="../syntax/modules_and_classes_rdoc.html">modules_and_classes</a>
    <li><a href="../syntax/pattern_matching_rdoc.html">pattern_matching</a>
    <li><a href="../syntax/precedence_rdoc.html">precedence</a>
    <li><a href="../syntax/refinements_rdoc.html">refinements</a>
    <li><a href="../timezones_rdoc.html">timezones</a>
    <li><a href="../windows_md.html">windows</a>
    <li><a href="../yjit/yjit_md.html">yjit</a>
    <li><a href="../yjit/yjit_hacking_md.html">yjit_hacking</a>
  </ul>
</div>

   </div>
  </div>
</nav>


<!--  carbon ads here -->

<div id='extraz'>
  <div class='adzbox-index'  >
   
  </div>
 </div>         


<main role="main" aria-label="Page NEWS/NEWS-3.1.0.md">

<h1 id="label-NEWS+for+Ruby+3.1.0"><a href="../ruby_3_3_0_preview2/NEWS_md.html">NEWS</a> for Ruby 3.1.0<span><a href="#label-NEWS+for+Ruby+3.1.0">&para;</a> <a href="#top">&uarr;</a></span></h1>

<p>This document is a list of user-visible feature changes since the <strong>3.0.0</strong> release, except for bug fixes.</p>

<p>Note that each entry is kept to a minimum, see links for details.</p>

<h2 id="label-Language+changes">Language changes<span><a href="#label-Language+changes">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>The block argument can now be anonymous if the block will only be passed to another method. [<a href="https://bugs.ruby-lang.org/issues/11256">Feature #11256</a>]</p>

<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">foo</span>(<span class="ruby-operator">&amp;</span>)
  <span class="ruby-identifier">bar</span>(<span class="ruby-operator">&amp;</span>)
<span class="ruby-keyword">end</span>
</pre>
</li><li>
<p>Pin operator now takes an expression. [<a href="https://bugs.ruby-lang.org/issues/17411">Feature #17411</a>]</p>

<pre class="ruby"><span class="ruby-constant">Prime</span>.<span class="ruby-identifier">each_cons</span>(<span class="ruby-value">2</span>).<span class="ruby-identifier">lazy</span>.<span class="ruby-identifier">find_all</span>{<span class="ruby-identifier">_1</span> <span class="ruby-keyword">in</span> [<span class="ruby-identifier">n</span>, <span class="ruby-operator">^</span>(<span class="ruby-identifier">n</span> <span class="ruby-operator">+</span> <span class="ruby-value">2</span>)]}.<span class="ruby-identifier">take</span>(<span class="ruby-value">3</span>).<span class="ruby-identifier">to_a</span>
<span class="ruby-comment">#=&gt; [[3, 5], [5, 7], [11, 13]]</span>
</pre>
</li><li>
<p>Pin operator now supports instance, class, and global variables. [<a href="https://bugs.ruby-lang.org/issues/17724">Feature #17724</a>]</p>

<pre class="ruby"><span class="ruby-ivar">@n</span> = <span class="ruby-value">5</span>
<span class="ruby-constant">Prime</span>.<span class="ruby-identifier">each_cons</span>(<span class="ruby-value">2</span>).<span class="ruby-identifier">lazy</span>.<span class="ruby-identifier">find</span>{<span class="ruby-identifier">_1</span> <span class="ruby-keyword">in</span> [<span class="ruby-identifier">n</span>, <span class="ruby-operator">^</span><span class="ruby-ivar">@n</span>]}
<span class="ruby-comment">#=&gt; [3, 5]</span>
</pre>
</li><li>
<p>One-line pattern matching is no longer experimental.</p>
</li><li>
<p>Parentheses can be omitted in one-line pattern matching. [<a href="https://bugs.ruby-lang.org/issues/16182">Feature #16182</a>]</p>

<pre class="ruby">[<span class="ruby-value">0</span>, <span class="ruby-value">1</span>] <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">_</span>, <span class="ruby-identifier">x</span>
{<span class="ruby-value">y:</span> <span class="ruby-value">2</span>} <span class="ruby-operator">=&gt;</span> <span class="ruby-value">y:</span>
<span class="ruby-identifier">x</span> <span class="ruby-comment">#=&gt; 1</span>
<span class="ruby-identifier">y</span> <span class="ruby-comment">#=&gt; 2</span>
</pre>
</li><li>
<p>Multiple assignment evaluation order has been made consistent with single assignment evaluation order. With single assignment, Ruby uses a left-to-right evaluation order. With this code:</p>

<pre class="ruby"><span class="ruby-identifier">foo</span>[<span class="ruby-value">0</span>] = <span class="ruby-identifier">bar</span>
</pre>

<p>The following evaluation order is used:</p>
<ol><li>
<p><code>foo</code></p>
</li><li>
<p><code>bar</code></p>
</li><li>
<p><code>[]=</code> called on the result of <code>foo</code></p>
</li></ol>

<p>In Ruby before 3.1.0, multiple assignment did not follow this evaluation order. With this code:</p>

<pre class="ruby"><span class="ruby-identifier">foo</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">bar</span>.<span class="ruby-identifier">baz</span> = <span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>
</pre>

<p>Versions of Ruby before 3.1.0 would evaluate in the following order</p>
<ol><li>
<p><code>a</code></p>
</li><li>
<p><code>b</code></p>
</li><li>
<p><code>foo</code></p>
</li><li>
<p><code>[]=</code> called on the result of <code>foo</code></p>
</li><li>
<p><code>bar</code></p>
</li><li>
<p><code>baz=</code> called on the result of <code>bar</code></p>
</li></ol>

<p>Starting in Ruby 3.1.0, the evaluation order is now consistent with single assignment, with the left-hand side being evaluated before the right-hand side:</p>
<ol><li>
<p><code>foo</code></p>
</li><li>
<p><code>bar</code></p>
</li><li>
<p><code>a</code></p>
</li><li>
<p><code>b</code></p>
</li><li>
<p><code>[]=</code> called on the result of <code>foo</code></p>
</li><li>
<p><code>baz=</code> called on the result of <code>bar</code></p>
</li></ol>

<p>[<a href="https://bugs.ruby-lang.org/issues/4443">Bug #4443</a>]</p>
</li><li>
<p>Values in <a href="../Hash.html"><code>Hash</code></a> literals and keyword arguments can be omitted. [<a href="https://bugs.ruby-lang.org/issues/14579">Feature #14579</a>]</p>

<p>For example,</p>
<ul><li>
<p><code>{x:, y:}</code> is a syntax sugar of <code>{x: x, y: y}</code>.</p>
</li><li>
<p><code>foo(x:, y:)</code> is a syntax sugar of <code>foo(x: x, y: y)</code>.</p>
</li></ul>

<p>Constant names, local variable names, and method names are allowed as key names. Note that a reserved word is considered as a local variable or method name even if it's a pseudo variable name such as <code>self</code>.</p>
</li><li>
<p>Non main-Ractors can get instance variables (ivars) of classes/modules if ivars refer to shareable objects. [<a href="https://bugs.ruby-lang.org/issues/17592">Feature #17592</a>]</p>
</li><li>
<p>A command syntax is allowed in endless method definitions, i.e., you can now write <code>def foo = puts &quot;Hello&quot;</code>. Note that <code>private def foo = puts &quot;Hello&quot;</code> does not parse. [<a href="https://bugs.ruby-lang.org/issues/17398">Feature #17398</a>]</p>
</li></ul>

<h2 id="label-Command+line+options">Command line options<span><a href="#label-Command+line+options">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p><code>--disable-gems</code> is now explicitly declared as “just for debugging”.  Never use it in any real-world codebase.  [<a href="https://bugs.ruby-lang.org/issues/17684">Feature #17684</a>]</p>
</li></ul>

<h2 id="label-Core+classes+updates">Core classes updates<span><a href="#label-Core+classes+updates">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>Note: We’re only listing outstanding class updates.</p>
<ul><li>
<p><a href="../Array.html"><code>Array</code></a></p>
<ul><li>
<p><a href="../Array.html#method-i-intersect-3F"><code>Array#intersect?</code></a> is added. [<a href="https://bugs.ruby-lang.org/issues/15198">Feature #15198</a>]</p>
</li></ul>
</li><li>
<p><a href="../Class.html"><code>Class</code></a></p>
<ul><li>
<p><a href="../Class.html#method-i-subclasses"><code>Class#subclasses</code></a>, which returns an array of classes directly inheriting from the receiver, not including singleton classes. [<a href="https://bugs.ruby-lang.org/issues/18273">Feature #18273</a>]</p>

<pre class="ruby"><span class="ruby-keyword">class</span> <span class="ruby-constant">A</span>; <span class="ruby-keyword">end</span>
<span class="ruby-keyword">class</span> <span class="ruby-constant">B</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">A</span>; <span class="ruby-keyword">end</span>
<span class="ruby-keyword">class</span> <span class="ruby-constant">C</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">B</span>; <span class="ruby-keyword">end</span>
<span class="ruby-keyword">class</span> <span class="ruby-constant">D</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">A</span>; <span class="ruby-keyword">end</span>
<span class="ruby-constant">A</span>.<span class="ruby-identifier">subclasses</span>    <span class="ruby-comment">#=&gt; [D, B]</span>
<span class="ruby-constant">B</span>.<span class="ruby-identifier">subclasses</span>    <span class="ruby-comment">#=&gt; [C]</span>
<span class="ruby-constant">C</span>.<span class="ruby-identifier">subclasses</span>    <span class="ruby-comment">#=&gt; []</span>
</pre>
</li></ul>
</li><li>
<p><a href="../Enumerable.html"><code>Enumerable</code></a></p>
<ul><li>
<p><a href="../Enumerable.html#method-i-compact"><code>Enumerable#compact</code></a> is added. [<a href="https://bugs.ruby-lang.org/issues/17312">Feature #17312</a>]</p>
</li><li>
<p><a href="../Enumerable.html#method-i-tally"><code>Enumerable#tally</code></a> now accepts an optional hash to count. [<a href="https://bugs.ruby-lang.org/issues/17744">Feature #17744</a>]</p>
</li><li>
<p><a href="../Enumerable.html#method-i-each_cons"><code>Enumerable#each_cons</code></a> and each_slice to return a receiver. [<a href="https://github.com/ruby/ruby/pull/1509">GH-1509</a>]</p>

<pre class="ruby">[<span class="ruby-value">1</span>, <span class="ruby-value">2</span>, <span class="ruby-value">3</span>].<span class="ruby-identifier">each_cons</span>(<span class="ruby-value">2</span>){}
<span class="ruby-comment"># 3.0 =&gt; nil</span>
<span class="ruby-comment"># 3.1 =&gt; [1, 2, 3]</span>

[<span class="ruby-value">1</span>, <span class="ruby-value">2</span>, <span class="ruby-value">3</span>].<span class="ruby-identifier">each_slice</span>(<span class="ruby-value">2</span>){}
<span class="ruby-comment"># 3.0 =&gt; nil</span>
<span class="ruby-comment"># 3.1 =&gt; [1, 2, 3]</span>
</pre>
</li></ul>
</li><li>
<p><a href="../Enumerator/Lazy.html"><code>Enumerator::Lazy</code></a></p>
<ul><li>
<p><a href="../Enumerator/Lazy.html#method-i-compact"><code>Enumerator::Lazy#compact</code></a> is added. [<a href="https://bugs.ruby-lang.org/issues/17312">Feature #17312</a>]</p>
</li></ul>
</li><li>
<p><a href="../File.html"><code>File</code></a></p>
<ul><li>
<p><a href="../File.html#method-c-dirname"><code>File.dirname</code></a> now accepts an optional argument for the level to strip path components. [<a href="https://bugs.ruby-lang.org/issues/12194">Feature #12194</a>]</p>
</li></ul>
</li><li>
<p><a href="../GC.html"><code>GC</code></a></p>
<ul><li>
<p>"GC.measure_total_time = true" enables the measurement of <a href="../GC.html"><code>GC</code></a>. Measurement can introduce overhead. It is enabled by default. <a href="../GC.html#method-c-measure_total_time"><code>GC.measure_total_time</code></a> returns the current setting. <a href="../GC.html#method-c-stat"><code>GC.stat[:time]</code></a> or <a href="../GC.html#method-c-stat"><code>GC.stat</code></a>(:time) returns measured time in milli-seconds. [[<a href="https://bugs.ruby-lang.org/issues/10917">Feature #10917</a>]]</p>
</li><li>
<p><a href="../GC.html#method-c-total_time"><code>GC.total_time</code></a> returns measured time in nano-seconds. [[<a href="https://bugs.ruby-lang.org/issues/10917">Feature #10917</a>]]</p>
</li></ul>
</li><li>
<p><a href="../Integer.html"><code>Integer</code></a></p>
<ul><li>
<p><a href="../Integer.html#method-c-try_convert"><code>Integer.try_convert</code></a> is added. [<a href="https://bugs.ruby-lang.org/issues/15211">Feature #15211</a>]</p>
</li></ul>
</li><li>
<p><a href="../Kernel.html"><code>Kernel</code></a></p>
<ul><li>
<p><a href="../Kernel.html#method-i-load"><code>Kernel#load</code></a> now accepts a module as the second argument, and will load the file using the given module as the top-level module. [<a href="https://bugs.ruby-lang.org/issues/6210">Feature #6210</a>]</p>
</li></ul>
</li><li>
<p><a href="../Marshal.html"><code>Marshal</code></a></p>
<ul><li>
<p><a href="../Marshal.html#method-c-load"><code>Marshal.load</code></a> now accepts a <code>freeze: true</code> option. All returned objects are frozen except for <code>Class</code> and <code>Module</code> instances. Strings are deduplicated. [<a href="https://bugs.ruby-lang.org/issues/18148">Feature #18148</a>]</p>
</li></ul>
</li><li>
<p><a href="../MatchData.html"><code>MatchData</code></a></p>
<ul><li>
<p><a href="../MatchData.html#method-i-match"><code>MatchData#match</code></a> is added [<a href="https://bugs.ruby-lang.org/issues/18172">Feature #18172</a>]</p>
</li><li>
<p><a href="../MatchData.html#method-i-match_length"><code>MatchData#match_length</code></a> is added [<a href="https://bugs.ruby-lang.org/issues/18172">Feature #18172</a>]</p>
</li></ul>
</li><li>
<p><a href="../Method.html"><code>Method</code></a> / <a href="../UnboundMethod.html"><code>UnboundMethod</code></a></p>
<ul><li>
<p>Method#public?, Method#private?, Method#protected?, UnboundMethod#public?, UnboundMethod#private?, UnboundMethod#protected? have been added. [<a href="https://bugs.ruby-lang.org/issues/11689">Feature #11689</a>]</p>
</li></ul>
</li><li>
<p><a href="../Module.html"><code>Module</code></a></p>
<ul><li>
<p><a href="../Module.html#method-i-prepend"><code>Module#prepend</code></a> now modifies the ancestor chain if the receiver already includes the argument. <a href="../Module.html#method-i-prepend"><code>Module#prepend</code></a> still does not modify the ancestor chain if the receiver has already prepended the argument. [<a href="https://bugs.ruby-lang.org/issues/17423">Bug #17423</a>]</p>
</li><li>
<p><a href="../Module.html#method-i-private"><code>Module#private</code></a>, public, protected, and module_function will now return their arguments. If a single argument is given, it is returned. If no arguments are given, nil is returned. If multiple arguments are given, they are returned as an array. [<a href="https://bugs.ruby-lang.org/issues/12495">Feature #12495</a>]</p>
</li></ul>
</li><li>
<p><a href="../Process.html"><code>Process</code></a></p>
<ul><li>
<p><a href="../Process.html"><code>Process</code></a>._fork is added. This is a core method for fork(2). Do not call this method directly; it is called by existing fork methods: <a href="../Kernel.html"><code>Kernel</code></a>.#fork, <a href="../Process.html#method-c-fork"><code>Process.fork</code></a>, and <a href="../IO.html#method-c-popen"><code>IO.popen</code></a>(“-”). Application monitoring libraries can overwrite this method to hook fork events. [<a href="https://bugs.ruby-lang.org/issues/17795">Feature #17795</a>]</p>
</li></ul>
</li><li>
<p><a href="../Struct.html"><code>Struct</code></a></p>
<ul><li>
<p>Passing only keyword arguments to Struct#initialize is warned. You need to use a <a href="../Hash.html"><code>Hash</code></a> literal to set a <a href="../Hash.html"><code>Hash</code></a> to a first member. [<a href="https://bugs.ruby-lang.org/issues/16806">Feature #16806</a>]</p>
</li><li>
<p>StructClass#keyword_init? is added [<a href="https://bugs.ruby-lang.org/issues/18008">Feature #18008</a>]</p>
</li></ul>
</li><li>
<p><a href="../String.html"><code>String</code></a></p>
<ul><li>
<p>Update Unicode version to 13.0.0 [<a href="https://bugs.ruby-lang.org/issues/17750">Feature #17750</a>] and Emoji version to 13.0 [<a href="https://bugs.ruby-lang.org/issues/18029">Feature #18029</a>]</p>
</li><li>
<p><a href="../String.html#method-i-unpack"><code>String#unpack</code></a> and <a href="../String.html#method-i-unpack1"><code>String#unpack1</code></a> now accept an <code>offset:</code> keyword argument to start the unpacking after an arbitrary number of bytes have been skipped. If <code>offset</code> is outside of the string bounds <code>ArgumentError</code> is raised. [<a href="https://bugs.ruby-lang.org/issues/18254">Feature #18254</a>]</p>
</li></ul>
</li><li>
<p><a href="../Thread.html"><code>Thread</code></a></p>
<ul><li>
<p><a href="../Thread.html#method-i-native_thread_id"><code>Thread#native_thread_id</code></a> is added. [<a href="https://bugs.ruby-lang.org/issues/17853">Feature #17853</a>]</p>
</li></ul>
</li><li>
<p><a href="../Thread/Backtrace.html"><code>Thread::Backtrace</code></a></p>
<ul><li>
<p><a href="../Thread/Backtrace.html#method-c-limit"><code>Thread::Backtrace.limit</code></a>, which returns the value to limit backtrace length set by <code>--backtrace-limit</code> command line option, is added. [<a href="https://bugs.ruby-lang.org/issues/17479">Feature #17479</a>]</p>
</li></ul>
</li><li>
<p><a href="../Thread/Queue.html"><code>Thread::Queue</code></a></p>
<ul><li>
<p><a href="../Thread/Queue.html#method-c-new"><code>Thread::Queue.new</code></a> now accepts an <a href="../Enumerable.html"><code>Enumerable</code></a> of initial values. [<a href="https://bugs.ruby-lang.org/issues/17327">Feature #17327</a>]</p>
</li></ul>
</li><li>
<p><a href="../Time.html"><code>Time</code></a></p>
<ul><li>
<p><a href="../Time.html#method-c-new"><code>Time.new</code></a> now accepts optional <code>in:</code> keyword argument for the timezone, as well as <code>Time.at</code> and <code>Time.now</code>, so that is now you can omit minor arguments to <code>Time.new</code>. [<a href="https://bugs.ruby-lang.org/issues/17485">Feature #17485</a>]</p>

<pre class="ruby"><span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2021</span>, <span class="ruby-value">12</span>, <span class="ruby-value">25</span>, <span class="ruby-value">in:</span> <span class="ruby-string">&quot;+07:00&quot;</span>)
<span class="ruby-comment">#=&gt; 2021-12-25 00:00:00 +0700</span>
</pre>

<p>At the same time, time component strings are converted to integers more strictly now.</p>

<pre class="ruby"><span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2021</span>, <span class="ruby-value">12</span>, <span class="ruby-value">25</span>, <span class="ruby-string">&quot;+07:30&quot;</span>)
<span class="ruby-comment">#=&gt; invalid value for Integer(): &quot;+07:30&quot; (ArgumentError)</span>
</pre>

<p>Ruby 3.0 or earlier returned probably unexpected result <code>2021-12-25 07:00:00</code>, not <code>2021-12-25 07:30:00</code> nor <code>2021-12-25 00:00:00 +07:30</code>.</p>
</li><li>
<p><a href="../Time.html#method-i-strftime"><code>Time#strftime</code></a> supports RFC 3339 UTC for unknown offset local time, <code>-0000</code>, as <code>%-z</code>. [<a href="https://bugs.ruby-lang.org/issues/17544">Feature #17544</a>]</p>
</li></ul>
</li><li>
<p><a href="../TracePoint.html"><code>TracePoint</code></a></p>
<ul><li>
<p><a href="../TracePoint.html#method-c-allow_reentry"><code>TracePoint.allow_reentry</code></a> is added to allow reenter while <a href="../TracePoint.html"><code>TracePoint</code></a> callback. [<a href="https://bugs.ruby-lang.org/issues/15912">Feature #15912</a>]</p>
</li></ul>
</li><li>
<p>$LOAD_PATH</p>
<ul><li>
<p>$LOAD_PATH.resolve_feature_path does not raise. [<a href="https://bugs.ruby-lang.org/issues/16043">Feature #16043</a>]</p>
</li></ul>
</li><li>
<p><a href="../Fiber.html"><code>Fiber</code></a> Scheduler</p>
<ul><li>
<p>Add support for <code>Addrinfo.getaddrinfo</code> using <code>address_resolve</code> hook. [<a href="https://bugs.ruby-lang.org/issues/17370">Feature #17370</a>]</p>
</li><li>
<p>Introduce non-blocking <code>Timeout.timeout</code> using <code>timeout_after</code> hook. [<a href="https://bugs.ruby-lang.org/issues/17470">Feature #17470</a>]</p>
</li><li>
<p>Introduce new scheduler hooks <code>io_read</code> and <code>io_write</code> along with a low level <code>IO::Buffer</code> for zero-copy read/write. [<a href="https://bugs.ruby-lang.org/issues/18020">Feature #18020</a>]</p>
</li><li>
<p><a href="../IO.html"><code>IO</code></a> hooks <code>io_wait</code>, <code>io_read</code>, <code>io_write</code>, receive the original <a href="../IO.html"><code>IO</code></a> object where possible. [<a href="https://bugs.ruby-lang.org/issues/18003">Bug #18003</a>]</p>
</li><li>
<p>Make <code>Monitor</code> fiber-safe. [<a href="https://bugs.ruby-lang.org/issues/17827">Bug #17827</a>]</p>
</li><li>
<p>Replace copy coroutine with pthread implementation. [<a href="https://bugs.ruby-lang.org/issues/18015">Feature #18015</a>]</p>
</li></ul>
</li><li>
<p><a href="../Refinement.html"><code>Refinement</code></a></p>
<ul><li>
<p>New class which represents a module created by <a href="../Module.html#method-i-refine"><code>Module#refine</code></a>. <code>include</code> and <code>prepend</code> are deprecated, and <code>import_methods</code> is added instead. [<a href="https://bugs.ruby-lang.org/issues/17429">Bug #17429</a>]</p>
</li></ul>
</li></ul>

<h2 id="label-Stdlib+updates">Stdlib updates<span><a href="#label-Stdlib+updates">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>The following default gem are updated.</p>
<ul><li>
<p>RubyGems 3.3.3</p>
</li><li>
<p>base64 0.1.1</p>
</li><li>
<p>benchmark 0.2.0</p>
</li><li>
<p>bigdecimal 3.1.1</p>
</li><li>
<p>bundler 2.3.3</p>
</li><li>
<p>cgi 0.3.1</p>
</li><li>
<p>csv 3.2.2</p>
</li><li>
<p>date 3.2.2</p>
</li><li>
<p>did_you_mean 1.6.1</p>
</li><li>
<p>digest 3.1.0</p>
</li><li>
<p>drb 2.1.0</p>
</li><li>
<p>erb 2.2.3</p>
</li><li>
<p>error_highlight 0.3.0</p>
</li><li>
<p>etc 1.3.0</p>
</li><li>
<p>fcntl 1.0.1</p>
</li><li>
<p>fiddle 1.1.0</p>
</li><li>
<p>fileutils 1.6.0</p>
</li><li>
<p>find 0.1.1</p>
</li><li>
<p>io-console 0.5.10</p>
</li><li>
<p>io-wait 0.2.1</p>
</li><li>
<p>ipaddr 1.2.3</p>
</li><li>
<p>irb 1.4.1</p>
</li><li>
<p>json 2.6.1</p>
</li><li>
<p>logger 1.5.0</p>
</li><li>
<p>net-http 0.2.0</p>
</li><li>
<p>net-protocol 0.1.2</p>
</li><li>
<p>nkf 0.1.1</p>
</li><li>
<p>open-uri 0.2.0</p>
</li><li>
<p>openssl 3.0.0</p>
</li><li>
<p>optparse 0.2.0</p>
</li><li>
<p>ostruct 0.5.2</p>
</li><li>
<p>pathname 0.2.0</p>
</li><li>
<p>pp 0.3.0</p>
</li><li>
<p>prettyprint 0.1.1</p>
</li><li>
<p>psych 4.0.3</p>
</li><li>
<p>racc 1.6.0</p>
</li><li>
<p>rdoc 6.4.0</p>
</li><li>
<p>readline 0.0.3</p>
</li><li>
<p>readline-ext 0.1.4</p>
</li><li>
<p>reline 0.3.0</p>
</li><li>
<p>resolv 0.2.1</p>
</li><li>
<p>rinda 0.1.1</p>
</li><li>
<p>ruby2_keywords 0.0.5</p>
</li><li>
<p>securerandom 0.1.1</p>
</li><li>
<p>set 1.0.2</p>
</li><li>
<p>stringio 3.0.1</p>
</li><li>
<p>strscan 3.0.1</p>
</li><li>
<p>tempfile 0.1.2</p>
</li><li>
<p>time 0.2.0</p>
</li><li>
<p>timeout 0.2.0</p>
</li><li>
<p>tmpdir 0.1.2</p>
</li><li>
<p>un 0.2.0</p>
</li><li>
<p>uri 0.11.0</p>
</li><li>
<p>yaml 0.2.0</p>
</li><li>
<p>zlib 2.1.1</p>
</li><li>
<p>RubyGems 3.3.3</p>
</li><li>
<p>base64 0.1.1</p>
</li><li>
<p>benchmark 0.2.0</p>
</li><li>
<p>bigdecimal 3.1.1</p>
</li><li>
<p>bundler 2.3.3</p>
</li><li>
<p>cgi 0.3.1</p>
</li><li>
<p>csv 3.2.2</p>
</li><li>
<p>date 3.2.2</p>
</li><li>
<p>did_you_mean 1.6.1</p>
</li><li>
<p>digest 3.1.0</p>
</li><li>
<p>drb 2.1.0</p>
</li><li>
<p>erb 2.2.3</p>
</li><li>
<p>error_highlight 0.3.0</p>
</li><li>
<p>etc 1.3.0</p>
</li><li>
<p>fcntl 1.0.1</p>
</li><li>
<p>fiddle 1.1.0</p>
</li><li>
<p>fileutils 1.6.0</p>
</li><li>
<p>find 0.1.1</p>
</li><li>
<p>io-console 0.5.10</p>
</li><li>
<p>io-wait 0.2.1</p>
</li><li>
<p>ipaddr 1.2.3</p>
</li><li>
<p>irb 1.4.1</p>
</li><li>
<p>json 2.6.1</p>
</li><li>
<p>logger 1.5.0</p>
</li><li>
<p>net-http 0.2.0</p>
</li><li>
<p>net-protocol 0.1.2</p>
</li><li>
<p>nkf 0.1.1</p>
</li><li>
<p>open-uri 0.2.0</p>
</li><li>
<p>openssl 3.0.0</p>
</li><li>
<p>optparse 0.2.0</p>
</li><li>
<p>ostruct 0.5.2</p>
</li><li>
<p>pathname 0.2.0</p>
</li><li>
<p>pp 0.3.0</p>
</li><li>
<p>prettyprint 0.1.1</p>
</li><li>
<p>psych 4.0.3</p>
</li><li>
<p>racc 1.6.0</p>
</li><li>
<p>rdoc 6.4.0</p>
</li><li>
<p>readline 0.0.3</p>
</li><li>
<p>readline-ext 0.1.4</p>
</li><li>
<p>reline 0.3.0</p>
</li><li>
<p>resolv 0.2.1</p>
</li><li>
<p>rinda 0.1.1</p>
</li><li>
<p>ruby2_keywords 0.0.5</p>
</li><li>
<p>securerandom 0.1.1</p>
</li><li>
<p>set 1.0.2</p>
</li><li>
<p>stringio 3.0.1</p>
</li><li>
<p>strscan 3.0.1</p>
</li><li>
<p>tempfile 0.1.2</p>
</li><li>
<p>time 0.2.0</p>
</li><li>
<p>timeout 0.2.0</p>
</li><li>
<p>tmpdir 0.1.2</p>
</li><li>
<p>un 0.2.0</p>
</li><li>
<p>uri 0.11.0</p>
</li><li>
<p>yaml 0.2.0</p>
</li><li>
<p>zlib 2.1.1</p>
</li></ul>
</li><li>
<p>The following bundled gems are updated.</p>
<ul><li>
<p>minitest 5.15.0</p>
</li><li>
<p>power_assert 2.0.1</p>
</li><li>
<p>rake 13.0.6</p>
</li><li>
<p>test-unit 3.5.3</p>
</li><li>
<p>rexml 3.2.5</p>
</li><li>
<p>rbs 2.0.0</p>
</li><li>
<p>typeprof 0.21.1</p>
</li><li>
<p>minitest 5.15.0</p>
</li><li>
<p>power_assert 2.0.1</p>
</li><li>
<p>rake 13.0.6</p>
</li><li>
<p>test-unit 3.5.3</p>
</li><li>
<p>rexml 3.2.5</p>
</li><li>
<p>rbs 2.0.0</p>
</li><li>
<p>typeprof 0.21.1</p>
</li></ul>
</li><li>
<p>The following default gems are now bundled gems.</p>
<ul><li>
<p>net-ftp 0.1.3</p>
</li><li>
<p>net-imap 0.2.2</p>
</li><li>
<p>net-pop 0.1.1</p>
</li><li>
<p>net-smtp 0.3.1</p>
</li><li>
<p>matrix 0.4.2</p>
</li><li>
<p>prime 0.1.2</p>
</li><li>
<p>debug 1.4.0</p>
</li><li>
<p>net-ftp 0.1.3</p>
</li><li>
<p>net-imap 0.2.2</p>
</li><li>
<p>net-pop 0.1.1</p>
</li><li>
<p>net-smtp 0.3.1</p>
</li><li>
<p>matrix 0.4.2</p>
</li><li>
<p>prime 0.1.2</p>
</li><li>
<p>debug 1.4.0</p>
</li></ul>
</li><li>
<p>The following gems has been removed from the Ruby standard library.</p>
<ul><li>
<p>dbm</p>
</li><li>
<p>gdbm</p>
</li><li>
<p>tracer</p>
</li><li>
<p>dbm</p>
</li><li>
<p>gdbm</p>
</li><li>
<p>tracer</p>
</li></ul>
</li><li>
<p>Coverage measurement now supports suspension. You can use <code>Coverage.suspend</code>  to stop the measurement temporarily, and <code>Coverage.resume</code> to restart it.  See [<a href="https://bugs.ruby-lang.org/issues/18176">Feature #18176</a>] in detail.</p>
</li><li>
<p><a href="../Random/Formatter.html"><code>Random::Formatter</code></a> is moved to random/formatter.rb, so that you can  use <code>Random#hex</code>, <code>Random#base64</code>, and so on without SecureRandom.  [<a href="https://bugs.ruby-lang.org/issues/18190">Feature #18190</a>]</p>
</li></ul>

<h2 id="label-Compatibility+issues">Compatibility issues<span><a href="#label-Compatibility+issues">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>Note: Excluding feature bug fixes.</p>
<ul><li>
<p><code>rb_io_wait_readable</code>, <code>rb_io_wait_writable</code> and <code>rb_wait_for_single_fd</code> are  deprecated in favour of <code>rb_io_maybe_wait_readable</code>,  <code>rb_io_maybe_wait_writable</code> and <code>rb_io_maybe_wait</code> respectively.  <code>rb_thread_wait_fd</code> and <code>rb_thread_fd_writable</code> are deprecated. [<a href="https://bugs.ruby-lang.org/issues/18003">Bug #18003</a>]</p>
</li></ul>

<h2 id="label-Stdlib+compatibility+issues">Stdlib compatibility issues<span><a href="#label-Stdlib+compatibility+issues">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p><code>ERB#initialize</code> warns <code>safe_level</code> and later arguments even without -w.  [<a href="https://bugs.ruby-lang.org/issues/14256">Feature #14256</a>]</p>
</li><li>
<p><code>lib/debug.rb</code> is replaced with <code>debug.gem</code></p>
</li><li>
<p><code>Kernel#pp</code> in <code>lib/pp.rb</code> uses the width of <code>IO#winsize</code> by default.  This means that the output width is automatically changed depending on  your terminal size. [<a href="https://bugs.ruby-lang.org/issues/12913">Feature #12913</a>]</p>
</li><li>
<p>Psych 4.0 changes <code>Psych.load</code> as <code>safe_load</code> by the default.  You may need to use Psych 3.3.2 for migrating to this behavior.  [<a href="https://bugs.ruby-lang.org/issues/17866">Bug #17866</a>]</p>
</li></ul>

<h2 id="label-C+API+updates">C API updates<span><a href="#label-C+API+updates">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>Documented. [<a href="https://github.com/ruby/ruby/pull/4815">GH-4815</a>]</p>
</li><li>
<p><code>rb_gc_force_recycle</code> is deprecated and has been changed to a no-op.  [<a href="https://bugs.ruby-lang.org/issues/18290">Feature #18290</a>]</p>
</li></ul>

<h2 id="label-Implementation+improvements">Implementation improvements<span><a href="#label-Implementation+improvements">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>Inline cache mechanism is introduced for reading class variables.  [<a href="https://bugs.ruby-lang.org/issues/17763">Feature #17763</a>]</p>
</li><li>
<p><code>instance_eval</code> and <code>instance_exec</code> now only allocate a singleton class when  required, avoiding extra objects and improving performance. [<a href="https://github.com/ruby/ruby/pull/5146">GH-5146</a>]</p>
</li><li>
<p>The performance of <code>Struct</code> accessors is improved. [<a href="https://github.com/ruby/ruby/pull/5131">GH-5131</a>]</p>
</li><li>
<p><code>mandatory_only?</code> builtin special form to improve performance on  builtin methods. [<a href="https://github.com/ruby/ruby/pull/5112">GH-5112</a>]</p>
</li><li>
<p>Experimental feature Variable Width Allocation in the garbage collector.  This feature is turned off by default and can be enabled by compiling Ruby  with flag <code>USE_RVARGC=1</code> set. [<a href="https://bugs.ruby-lang.org/issues/18045">Feature #18045</a>] [<a href="https://bugs.ruby-lang.org/issues/18239">Feature #18239</a>]</p>
</li></ul>

<h2 id="label-JIT">JIT<span><a href="#label-JIT">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>Rename Ruby 3.0’s <code>--jit</code> to <code>--mjit</code>, and alias <code>--jit</code> to <code>--yjit</code>  on non-Windows x86-64 platforms and to <code>--mjit</code> on others.</p>
</li></ul>

<h3 id="label-MJIT">MJIT<span><a href="#label-MJIT">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>The default <code>--mjit-max-cache</code> is changed from 100 to 10000.</p>
</li><li>
<p>JIT-ed code is no longer cancelled when a <a href="../TracePoint.html"><code>TracePoint</code></a> for class events  is enabled.</p>
</li><li>
<p>The JIT compiler no longer skips compilation of methods longer than  1000 instructions.</p>
</li><li>
<p><code>--mjit-verbose</code> and <code>--mjit-warning</code> output “JIT cancel” when JIT-ed  code is disabled because <a href="../TracePoint.html"><code>TracePoint</code></a> or <a href="../GC.html#method-c-compact"><code>GC.compact</code></a> is used.</p>
</li></ul>

<h3 id="label-YJIT-3A+New+experimental+in-process+JIT+compiler">YJIT: New experimental in-process JIT compiler<span><a href="#label-YJIT-3A+New+experimental+in-process+JIT+compiler">&para;</a> <a href="#top">&uarr;</a></span></h3>

<p>New JIT compiler available as an experimental feature. [<a href="https://bugs.ruby-lang.org/issues/18229">Feature #18229</a>]</p>

<p>See <a href="https://shopify.engineering/yjit-just-in-time-compiler-cruby">this blog post</a> introducing the project.</p>
<ul><li>
<p>Disabled by default, use <code>--yjit</code> command-line option to enable YJIT.</p>
</li><li>
<p>Performance improvements on benchmarks based on real-world software,  up to 22% on railsbench, 39% on liquid-render.</p>
</li><li>
<p>Fast warm-up times.</p>
</li><li>
<p>Limited to Unix-like x86-64 platforms for now.</p>
</li></ul>

<h2 id="label-Static+analysis">Static analysis<span><a href="#label-Static+analysis">&para;</a> <a href="#top">&uarr;</a></span></h2>

<h3 id="label-RBS">RBS<span><a href="#label-RBS">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>Generics type parameters can be bounded (<a href="https://github.com/ruby/rbs/pull/844">PR</a>).</p>

<pre># `T` must be compatible with the `_Output` interface.
# `PrettyPrint[String]` is ok, but `PrettyPrint[Integer]` is a type error.
class PrettyPrint[T &lt; _Output]
  interface _Output
    def &lt;&lt;: (String) -&gt; void
  end

  attr_reader output: T

  def initialize: (T output) -&gt; void
end</pre>
</li><li>
<p>Type aliases can be generic. (<a href="https://github.com/ruby/rbs/pull/823">PR</a>)</p>

<pre># Defines a generic type `list`.
type list[T] = [ T, list[T] ]
             | nil

type str_list = list[String]
type int_list = list[Integer]</pre>
</li><li>
<p><a href="https://github.com/ruby/rbs/blob/cdd6a3a896001e25bd1feda3eab7f470bae935c1/docs/collection.md">rbs collection</a> has been introduced to manage gems’ RBSs.</p>
</li><li>
<p>Many signatures for built-in and standard libraries have been added/updated.</p>
</li><li>
<p>It includes many bug fixes and performance improvements too.</p>
</li></ul>

<p>See the <a href="https://github.com/ruby/rbs/blob/cdd6a3a896001e25bd1feda3eab7f470bae935c1/CHANGELOG.md">CHANGELOG.md</a> for more information.</p>

<h3 id="label-TypeProf">TypeProf<span><a href="#label-TypeProf">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p><a href="https://github.com/ruby/typeprof/blob/ca15c5dae9bd62668463165f8409bd66ce7de223/doc/ide.md">Experimental IDE support</a> has been implemented.</p>
</li><li>
<p>Many bug fixes and performance improvements since Ruby 3.0.0.</p>
</li></ul>

<h2 id="label-Debugger">Debugger<span><a href="#label-Debugger">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>A new debugger <a href="https://github.com/ruby/debug">debug.gem</a> is bundled.  debug.gem is a fast debugger implementation, and it provides many features  like remote debugging, colorful REPL, IDE (VSCode) integration, and more.  It replaces <code>lib/debug.rb</code> standard library.</p>
</li><li>
<p><code>rdbg</code> command is also installed into <code>bin/</code> directory to start and control  debugging execution.</p>
</li></ul>

<h2 id="label-error_highlight">error_highlight<span><a href="#label-error_highlight">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>A built-in gem called error_highlight has been introduced. It shows fine-grained error locations in the backtrace.</p>

<p>Example: <code>title = json[:article][:title]</code></p>

<p>If <code>json</code> is nil, it shows:</p>

<pre>$ ruby test.rb
test.rb:2:in `&lt;main&gt;&#39;: undefined method `[]&#39; for nil:NilClass (NoMethodError)

title = json[:article][:title]
            ^^^^^^^^^^</pre>

<p>If <code>json[:article]</code> returns nil, it shows:</p>

<pre>$ ruby test.rb
test.rb:2:in `&lt;main&gt;&#39;: undefined method `[]&#39; for nil:NilClass (NoMethodError)

title = json[:article][:title]
                      ^^^^^^^^</pre>

<p>This feature is enabled by default. You can disable it by using a command-line option <code>--disable-error_highlight</code>. See <a href="https://github.com/ruby/error_highlight">the repository</a> in detail.</p>

<h2 id="label-IRB+Autocomplete+and+Document+Display">IRB Autocomplete and Document Display<span><a href="#label-IRB+Autocomplete+and+Document+Display">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>The IRB now has an autocomplete feature, where you can just type in the code, and the completion candidates dialog will appear. You can use Tab and Shift+Tab to move up and down.</p>

<p>If documents are installed when you select a completion candidate, the documentation dialog will appear next to the completion candidates dialog, showing part of the content. You can read the full document by pressing Alt+d.</p>

<h2 id="label-Miscellaneous+changes">Miscellaneous changes<span><a href="#label-Miscellaneous+changes">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>lib/objspace/trace.rb is added, which is a tool for tracing the object  allocation. Just by requiring this file, tracing is started <em>immediately</em>.  Just by <code>Kernel#p</code>, you can investigate where an object was created.  Note that just requiring this file brings a large performance overhead.  This is only for debugging purposes. Do not use this in production.  [<a href="https://bugs.ruby-lang.org/issues/17762">Feature #17762</a>]</p>
</li><li>
<p>Now exceptions raised in finalizers will be printed to <code>STDERR</code>, unless  <code>$VERBOSE</code> is <code>nil</code>. [<a href="https://bugs.ruby-lang.org/issues/17798">Feature #17798</a>]</p>
</li><li>
<p><code>ruby -run -e httpd</code> displays URLs to access. [<a href="https://bugs.ruby-lang.org/issues/17847">Feature #17847</a>]</p>
</li><li>
<p>Add <code>ruby -run -e colorize</code> to colorize Ruby code using  <code>IRB::Color.colorize_code</code>.</p>
</li></ul>

</main>

</div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>. </p><p><a href="https://jamesbritt.bandcamp.com/">Hack your world.  Feed your head.  Live curious</a>.</p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

